package cn.wolfcode.domain;

import cn.wolfcode.enums.NoticeLevelEnum;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Getter
@Setter
@ToString
public class Notice2 {
    /** */
    private Long id;

    /** */
    private String title;

    /** */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** */
    private Integer level;

    /** */
    private String info;

    /** */
    private Boolean noticeStatus;

    /** 创建人*/
    private Employee employee;

    /*已读未读状态*/
    private EmployeeNotice2 employeeNotice2;


    //找到当前公告对象的公告级别
    public String findNoticeLevel(){
        return NoticeLevelEnum.findName(level);
    }
}